$tktowner = read-host "Please enter request ticket;dl owner ID like sr123;chaoyuew"
$Notes = $tktowner.split(";")[0] + " - Distribution Group Created  -" +(get-date).ToString('MM/dd/yyyy')
$owner = $tktowner.split(";")[1].trim()
clear-content .\dl.txt
ii .\dl.txt
write-host -foregroundcolor yellow "Please put the DL name in the opened txt"
read-host " "
foreach ($dl in Get-Content .\dl.txt)
{
$dl =$dl.trim()
$dlalias= (-join($dl.split(' '))).trim()
new-DistributionGroup -Name $dl  -OrganizationalUnit 'domain.internal/x/xx/xxx/xxxx' -SamAccountName $dl  -Alias $dlalias
set-adgroup -server $dc -identity $dl -add @{'info'= $Notes}
if($owner -ne $null -and $owner -ne "")
{set-adgroup -server $dc -identity $dl -ManagedBy $owner
}
}